using UnityEngine;
using System.Collections; 

public class InventoryMouseHandler : MonoBehaviour {

	// Use this for initialization
	void Start () {
        transform.GetComponent<GUITexture>().enabled = false;	
	
	}
	
	// Update is called once per frame
	void Update () {
	    transform.position = new Vector3(Input.mousePosition.x/Screen.width, Input.mousePosition.y/Screen.height,0);
	
	}

    public void ReleaseCursorIcon()
    {//empties the cursor icon and shows the mouse icon
        transform.GetComponent<GUITexture>().enabled = false;
	    Screen.showCursor = true;
    }

    public void SetCursor(Texture t   ){
        transform.GetComponent<GUITexture>().texture = t;
        transform.GetComponent<GUITexture>().enabled = true;
	    Screen.showCursor = false;	
    }
}

 